var FS = {
    sync: function (h, checkStatus) {
        var cbk = 'FS.checkLogin';

        if (checkStatus) {
            cbk = 'FS.checkStatus';
        }
        $.get('http://stage.fotostrana.ru/fast/lostSon.php', {h: h, jsonp: cbk}, undefined, 'jsonp');
    },

    checkLogin: function (login, id) {
        if (login) {
            $.get('/fs_sync.php', {id: id}, function (data) {
                if (data == 'ok') {
                    location.reload();
                }
            });
        } else {
            alert('Not login on fs');
            $.cookie('uid', null);
        }
    },

    checkStatus: function (login, id) {
        if (login) {
            $.get('/fs_sync.php', {id: id}, function (data) {
                if (data != 'ok') {
                    $.cookie('uid', null);
                    location.reload();
                }
            });
        } else {
            $.cookie('uid', null);
        }
    },
    
    notify: function (data)
    {
        alert(data);
    }
    
    
}